import { Component } from "../index";


export function print(value: any) {
    if (value == null) {
        Deno.core.print("null\n");
    }
    else if (value.constructor == String) {
        Deno.core.print(value + "\n");
    } else if (value instanceof Component) {
        Deno.core.print(value.toString() + "\n");
    }
    else {
        Deno.core.print(JSON.stringify(value) + "\n");
    }
}

globalThis.print = print;